<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once APPLICATION_PATH.'/misc/additional.php';
require_once APPLICATION_PATH.'/misc/sessionController.php';
class Application_Controllers_Admin_ActionEditController
{   public $wrongMessage="";
    //validation before registration
    public function preEdit($form){

    }
    //action on registration
    public function onEdit($form){
        $admins = new Application_Model_DbTable_Admin();
        $actionLog = new Application_Model_DbTable_Actionlog();
        $sessionController = new sessionController();

        $admins->updateAdminData((int)$form->getValue("admin_id"), $form->getValue('name'),$form->getValue("email"),
                                $form->getValue("phone"),$form->getValue('details'));
        
        
        $actionLog->addActionLog($sessionController->getSessionLogId(),
                                            "[".$_SERVER['REMOTE_ADDR'].
                                            "] Edit ".
                                            "Username :".$sessionController->getSessionUsername()." ");
           
        
    }
    public function postEdit($username,$password){
        
                    
    }

 
}
?>
